package com.shengxian.basic.mylogin.controller;

import com.shengxian.basic.mylogin.entity.UserDenglu;
import com.shengxian.basic.mylogin.result.R;
import com.shengxian.basic.mylogin.result.myresult;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Api(description = "前端登录首页 ")
@RestController
@RequestMapping("/Element_ui")
@CrossOrigin
public class loginVue {

    @PostMapping("login")
    public myresult login() {
        myresult res = new myresult();
        res.data.put("token", "admin");
        return res;
    }

    @GetMapping("info")
    public myresult info() {
        myresult res = new myresult();
        res.data.put("roles", "[admin]");
        res.data.put("name", "admin");
        res.data.put("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
        return res;
    }


//    //login
//    @PostMapping("login")
//    public R login() {
//        return R.ok().data("token","admin");
//    }
//    //info
//    @GetMapping("info")
//    public R info() {
//        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
//    }


}
